package com.deep.deepenterpise.model.entity;

import com.deep.deepenterpise.model.bo.DrUserInfoBo;
import com.deep.deepenterpise.model.to.unit.DrDangerHistoryTo;
import lombok.Data;

import java.io.Serializable;

/**
 * DR隐患主表
 *
 * @TableName dr_danger_history
 */
@Data
public class DrDangerHistory implements Serializable {
    /**
     *
     */
    private Integer drId;

    /**
     * 安检订单号
     */
    private String drOrderNum;

    /**
     * 隐患单号
     */
    private String drDangerNum;

    private Integer drType;

    /**
     * 用户id
     */
    private Integer drMemberId;

    /**
     * 用户姓名
     */
    private String drMemberName;

    /**
     * 用户电话
     */
    private String drMemberPhone;

    /**
     * 用户地址
     */
    private String drMemberAddress;

    /**
     * 检查人姓名
     */
    private String drCheckName;

    /**
     * 检查人电话
     */
    private String drCheckPhone;

    /**
     * 检查场站uuid
     */
    private String drCheckUnit;

    /**
     * 1是整改完成2是待审核0未开始
     */
    private Integer drStatus;

    /**
     * 创建时间
     */
    private Long drCreateTime;

    private Long drUpdateTime;

    private static final long serialVersionUID = 1L;

    public DrDangerHistory() {
    }

    public DrDangerHistory(Integer drType, Integer drStatus, String drOrderNum, String drDangerNum, Long drNowTime,
                           DrUserInfoBo drUserInfoBo, DrDangerHistoryTo drDangerHistoryTo) {
        this.drOrderNum = drOrderNum;
        this.drDangerNum = drDangerNum;
        this.drType = drType;
        this.drMemberId = drDangerHistoryTo.getDrMemberId();
        this.drMemberName = drDangerHistoryTo.getDrMemberName();
        this.drMemberPhone = drDangerHistoryTo.getDrMemberPhone();
        this.drMemberAddress = drDangerHistoryTo.getDrMemberAddress();
        this.drCheckName = drUserInfoBo.getDrUserName();
        this.drCheckPhone = drUserInfoBo.getDrUserPhone();
        this.drCheckUnit = drUserInfoBo.getDrUnitKey();
        this.drStatus = drStatus;
        this.drCreateTime = drNowTime;
        this.drUpdateTime = drNowTime;
    }
}